<%--
  Created by IntelliJ IDEA.
  User: Boss
  Date: 2021/5/14
  Time: 15:57
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<link rel="stylesheet" type="text/css" href="layui/css/layui.css">
<style type="text/css">

</style>
<body>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">输入框</label>
        <div class="layui-input-block">
            <input type="text" name="cardId" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input ">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo" >立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>

<script src="layui/layui.js"></script>
<script src="js/jquery-1.12.4.js"></script>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            layer.msg(JSON.stringify(data.field));
            return false;
        });
    });
    // $(".btName").click(function () {
    //     let cardId=$("input[name='cardName']").val();
    //     $.ajax({
    //         url:"BorrowServlet?opr=CBeOverdue",
    //         type:"post",
    //         data:{
    //             cardId:cardId
    //         },
    //         dataType:"json",
    //         success:function (data) {
    //            var list = data.list;
    //            console.log(list);
    //             var str="";
    //            for (var i=0;i<list.length;i++){
    //                str+="<tr><td>"+list[i].id+"</td>"+
    //                    "<td>"+list[i].cardId+"</td>"+
    //                    "<td>"+list[i].bookId+"</td>"+
    //                    "<td>"+list[i].startTime+"</td>"+
    //                    "<td>"+list[i].day+"</td>"+
    //                    "<td>"+list[i].endTime+"</td>"+
    //                    "<td>"+list[i].retype+"</td>"+
    //                    "<td>"+list[i].money+"</td>"+
    //                    "<td><input name='bt' type='button' value='修改' class='xiugai'>&nbsp;&nbsp;<input name='bt' type='button' class='quxiao' value='取消'></td>"+
    //                    "</tr>"
    //            }
    //            $("#center").append(str);
    //         }
    //     })
    // })
</script>
</body>
</html>
